class CreateProductHasCategory < ActiveRecord::Migration
  def change
    create_table :product_has_category, :id => false, :force => true do |t|
      t.references :product,  :null => false
      t.references :category, :null => false
    end

    add_index :product_has_category, :product_id
    add_index :product_has_category, :category_id
  end
end